<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">

    <title>My JSP 'memberJoinForm.jsp' starting page</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">

<link href="css/style.css" rel="stylesheet" type="text/css">

	<script>
	function formCheck(){
		if( memberform.id.value.length == 0 ){
			alert('IDを入力して下さい.');
			memberform.id.focus();
			return false;
		}
		if( memberform.checked.value.length == 0 ){
			alert('ID重複検査をして下さい');
			return false;
		}
		if( memberform.password1.value.length == 0 ){
			alert('パスワードを入力して下さい.');
			memberform.password1.focus();
			return false;
		}
		if( memberform.name.value.length == 0 ){
			alert('名前を入力して下さい.');
			memberform.name.focus();
			return false;
		}
		if( memberform.password1.value != memberform.password2.value ){
			alert('パスワードを再度確認して下さい.');
			memberform.password2.select();
			memberform.password2.focus();
			return false;
		}
	}
	function idcheck(){
		if( memberform.id.value.length == 0 ){
			alert('IDを入力して下さい.');
			memberform.id.focus();
			return false;
		}
		var id = memberform.id.value;
		location.href='member/memberIdcheck.action?id='+id;

	}
	</script>

  </head>

  <body>
<form name="memberform" action="<s:url value="/member/memberJoin.action"/>" method="post" onsubmit="return formCheck();">

<table width="60%" cellpadding="3" cellspacing="3" align=center class="nobd" class="table01">
	<tr>
		<td height="30" align="right">TOPメニュー
		</td>
	<tr>

	<tr>
		<td align="center">
			<h3>::社員登録::</h3>
		</td>
	<tr>
	<tr>
		<td>
			<table width="100%" cellpadding="3" cellspacing="3" align=center class="table01">
				<colgroup>
  					<col width="150">
  					<col width="*">
				</colgroup>
				<tr>
					<td class="tle">ユーザID</td>
    				<td class="cont">
    				<input name="member.id" value="${session.checked}" id="id" style="width: 150" Class="ed"/>
    					<input type="button" value="ID重複確認" onclick="javascript:idcheck();"/>
    				<input type="hidden" value="${session.checked}" id="checked"/>
    				<font color="red">${fieldErrors.idcheckmsg}</font>
    				</td>
				</tr>
				<tr>
					<td class="tle">パスワード</td>
					<td class="cont">
					<input type="password" name="member.password" id="password1" style="width: 150" Class="ed"/></td>
				</tr>
				<tr>
					<td class="tle">パスワード確認</td>
					<td class="cont"><input type="password" id="password2" style="width: 150" Class="ed"/></td>
				</tr>
				<tr>
					<td class="tle">氏名（漢字）</td>
					<td class="cont"><input type="text" name="member.name" id="member.name" style="width: 150" Class="ed" >&nbsp;&nbsp;<font class="cmt" id="">*空白なしで漢字のみ入力可能です。</font></td>
				</tr>
				<tr>
					<td class="tle">所属情報</td>
					<td class="cont">
						<select name="member.group" Class="ed">
							<option></option>
							<option>1グループ</option>
							<option>2グループ</option>
							<option>3グループ</option>
						</select>
						<select name="member.kengen" Class="ed">
							<option></option>
							<option>部長</option>
							<option>マネージャー</option>
							<option>リーダー</option>
							<option>エンジニア</option>
						</select>
					</td>
				</tr>

				<tr>
					<td class="tle">電話番号</td>
					<td class="cont">
					<input type="text" id="member.j_phone1" size="10" Class="ed" >-
				<input type="text" id="member.j_phone2" size="10" Class="ed" >-
					<input type="text" id="member.j_phone3" size="10" Class="ed" ></td>
				</tr>
				<tr>
					<td class="tle">緊急連絡先</td>
					<td class="cont">
					<input type="text" id="member.k_phone1" size="10" Class="ed" >-
				　　<input type="text" id="member.k_phone2" size="10" Class="ed" >-
					<input type="text" id="member.k_phone3" size="10" Class="ed" ></td>
				</tr>
				<tr>
					<td class="tle">現場</td>
					<td class="cont"><input type="text" id="member.gennba" Class="ed" ></td>
				</tr>
				<tr>
					<td class="tle">プロジェクト名</td>
					<td class="cont"><input type="text" id="member.projectmei" Class="ed" ></td>
				</tr>
				<tr>
					<td class="tle">ビザ有効期間</td>
					<td class="cont"><input type="text" id="member.biza" Class="ed" ></td>
				</tr>
				<tr>
					<td class="tle">メールアドレス</td>
					<td class="cont"><input type="text" id="member.email1" size="20" Class="ed" />@
					<input type="text" id="member.email2" size="20" Class="ed" /></td>
				</tr>
				<tr>
					<td align="center" colspan="2"><input type="submit" value="登録" />&nbsp;&nbsp;
					<input type="button" value="戻る" onclick="location.href='../index.html'"/></td>
				</tr>
			</table>
		</td>
	<tr>
</table>
</form>
  </body>
</html>
